PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

AppleScript Commands

AppleScript commands are commands that are built into the AppleScript language. They act on values in scripts. The target of an AppleScript command is a value in the current script, which is usually specified in the direct parameter of the command.

There are only five AppleScript commands: Get, Set, Count, Copy, and Run. All of these commands except the Copy command can also function as application commands. For the Count, Get, Run, and Set commands, if the direct parameter is a value, then the command functions as an AppleScript command. If the direct parameter is an application object, the command functions as an application command.

For example, the following Count command functions as an AppleScript command because the direct parameter is a value (a list):

count {"How", "many", "items", "in", "this", "list"}

The following Count command functions as an application command because the direct parameter is an application object:

count the files in the first window of application "Finder"

For more examples of how to use Copy, Count, Get, Run, and Set, see the command definitions later in this chapter.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)